package com.nowcoder.community.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.nowcoder.community.entity.LoginTicket;
import com.nowcoder.community.entity.User;
import org.springframework.security.core.GrantedAuthority;

import java.util.Collection;
import java.util.Map;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author ChenJH
 * @since 2022-12-26
 */
public interface IUserService extends IService<User> {

    Map<String, Object> register(User user);
    int activation(int userId,String code);
    Map<String,Object> login(String username,String password,int expiredSeconds);
    void logout(String ticket);
    LoginTicket findLoginTicket(String ticket);
    boolean updateHeader(int userId,String headerUrl);
    Collection<? extends GrantedAuthority> getAuthorities(int userId);
}
